<%@ page language="java"  pageEncoding="UTF-8"%>
<%@taglib uri="/WEB-INF/struts-tags.tld" prefix="s"%>
<!DOCTYPE html>
<html lang="zh">
	<head>
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<title>卓越大厦-沈阳外卖网</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="description" content="在卓越大厦附近叫外卖，查看卓越大厦附近的餐厅、美食信息" />
		<!-- Bootstrap -->
		<link href="publicui/bootstrap/css/bootstrap.min.css" rel="stylesheet"
			media="screen" />
		<!--[if lt IE 9]>
  <script src="public/js/html5shiv.js"></script>
<![endif]-->
		<!-- application  -->
		<link href="css/head.css" rel="stylesheet" />
		<link href="css/foot.css" rel="stylesheet" />
		<link href="css/restaurant_manager.css" rel="stylesheet" />
	</head>
	<body>

		<!-----nav-->
<s:action name="shopTop" executeResult="true"></s:action>
		<!---/nav   -->

		<!---/body   -->
		<div class="content">

			<div class="wash-paper clearfix" id="profile">
				<s:include value="/WEB-INF/shopkeeper/menu.jsp" />

				<div class="main-content" >
					<div class="content-header">
						<h2>积盛和 菜单饭店菜单管理</h2>
					</div>

					<div class="content-inner"     >
                    <!-- 
						<div class="alert rating-time-limit-tips">
							请确定送餐速度
						</div>
                       -->
						<div class="order-list"  >
						
							<!--    循环开始   -->
                             <span id="ref_time" ref_time='1364954294000'></span>
                                 <div class="order-block">
                        
                                
                                
                                <div class="order-table-wrapper " >
                                <form action="/shopkeeper_restaurant_menu.action" method="POST" id="menu">
                                <s:hidden name="id" />
                                <s:hidden name="action" />
											<table class="ml10" border="0" cellspacing="10"
												cellpadding="0">
												<tr class="input_height">
													<td width="180"   >
														
														<label >
                                                        <span  class="red" >*</span>
															菜单类别
														</label>

													</td>
													<td>
														<div id="entrySelect">
															<s:select list="typeList" name="typeId" id="typeId" listKey="key" listValue="value"></s:select>
															<span class="success4" id="typeIdMsg"></span>
														</div>
														
													</td>
												</tr>
												<tr class="input_height">
													<td>
                                                    	<label >
														<span class="red" >*</span>
														
															菜名
														</label>
													</td>
													<td>
														<s:textfield id="menuName" name="menuName" cssClass="input_text"/>
														<span class="success4" id="menuNameMsg"></span>
													</td>
												</tr>
												<tr class="input_height">
													<td>
                                                    <label >
														<span class="red">*</span>
														
														单价
														</label>
													</td>
													<td>
														<s:textfield id="price" name="price" cssClass="input_text"/>
														<span class="success4" id="priceMsg"></span>
													</td>
												</tr>
												<tr class="input_height">
													<td>
                                                    <label >
														<span class="red">*</span>
														
														折扣价
														</label>
													</td>
													<td>
														<s:textfield id="discount" name="discount" cssClass="input_text"/>
														<span class="success4" id="discountMsg"></span>
													</td>
												</tr>
												<tr class="input_height">
													<td width="180"   >
														
														<label >
                                                        <span  class="red" >*</span>
															是否促销
														</label>

													</td>
													<td>
														<div id="entrySelect">
															<s:select list="isPromotionList" name="isPromotion" id="isPromotion" listKey="key" listValue="value"></s:select>
															<span class="success4" id="isPromotionMsg"></span>
														</div>
														
													</td>
												</tr>
												<tr class="input_height">
													<td width="180"   >
														
														<label >
                                                        <span  class="red" >*</span>
															是否招牌
														</label>

													</td>
													<td>
														<div id="entrySelect">
															<s:select list="isFaciaList" name="isFacia" id="isFacia" listKey="key" listValue="value"></s:select>
															<span class="success4" id="isFaciaMsg"></span>
														</div>
														
													</td>
												</tr>
												<tr class="input_height">
													<td width="180"   >
														
														<label >
                                                        <span  class="red" >*</span>
															是否显示
														</label>

													</td>
													<td>
														<div id="entrySelect">
															<s:select list="isShowList" name="isShow" id="isShow" listKey="key" listValue="value"></s:select>
															<span class="success4" id="isShowMsg"></span>
														</div>
														
													</td>
												</tr>
												<tr>
													<td colspan="2" class="pl100 pt10">
														<button tabindex="5" type="button" class="btn btn-warning"
															 onclick="VF_menuflag();return false;">
															保存信息
														</button>
													</td>
												</tr>
											</table>
										</form>
                                       
                                
                                </div>
                        
                              </div>
               <!--    循环结束   -->
							

							</div>

						</div>

					</div>
				</div>
			</div>


			<!--   /content  -->
    <s:action name="foot" executeResult="true"></s:action>
		</div>
		

		<!---/body   -->


		<script src="publicui/js/jquery-1.8.3.js"></script>
		<script src="publicui/jquery-ui/js/jquery-ui-1.9.2.custom.js"></script>
		<script src="publicui/bootstrap/js/bootstrap.min.js"></script>
		<script src="js/head.js"></script>
<script language="JavaScript" type="text/javascript">
function checkMenuName(){
	if ($('#menuName').val() == "") {
		$('#menuNameMsg').html('请您按照正确格式填写菜名');
   		return false;
	}else{
		$('#menuNameMsg').html('<img src="../images/check_right.gif" width="16" height="16">');
   		return true;
	}
}
function checkPrice(){
	var price = $('#price').val();
	var regu =/^[1-9]\d{0,5}(\.\d{1,1})?$/;
	var re = new RegExp(regu);
	if (re.test(price)) {
		$('#priceMsg').html('请您按照正确格式单价');
   		return true;
	}else{
		$('#priceMsg').html('<img src="../images/check_right.gif" width="16" height="16">');
   		return false;
	}
}
function checkDiscount(){
	var discount = $('#discount').val();
	var regu =/^[1-9]\d{0,5}(\.\d{1,1})?$/;
	var re = new RegExp(regu);
	if (re.test(discount)) {
		$('#discountMsg').html('请您按照正确格式促销价');
   		return true;
	}else{
		$('#discountMsg').html('<img src="../images/check_right.gif" width="16" height="16">');
   		return false;
	}
}

function checkIsPromotion(){
	if ($('#isPromotion').val() == -1) {
		$('#isPromotionMsg').html('请您选择是否促销');
   		return false;
	}else{
		$('#isPromotionMsg').html('<img src="../images/check_right.gif" width="16" height="16">');
   		return true;
	}
}
function checkIsFacia(){
	if ($('#isFacia').val() == -1) {
		$('#isFaciaMsg').html('请您选择是否招牌');
   		return false;
	}else{
		$('#isFaciaMsg').html('<img src="../images/check_right.gif" width="16" height="16">');
   		return true;
	}
}
function checkIsShow(){
	if ($('#isShow').val() == -1) {
		$('#isShowMsg').html('请您选择是否显示');
   		return false;
	}else{
		$('#isShowMsg').html('<img src="../images/check_right.gif" width="16" height="16">');
   		return true;
	}
}
function checkTypeId(){
	if ($('#typeId').val() == -1) {
		$('#typeIdMsg').html('请您选择菜单类别');
   		return false;
	}else{
		$('#typeIdMsg').html('<img src="../images/check_right.gif" width="16" height="16">');
   		return true;
	}
}
function VF_menuflag(){
	var check_bl01=checkMenuName();
	var check_bl02=checkPrice();
	var check_bl03=checkDiscount();
	var check_bl04=checkIsPromotion();
	var check_bl05=checkIsFacia();
	var check_bl06=checkIsShow();
	var check_bl07=checkTypeId();
	//alert(check_bl01  +"|"+ check_bl02  +"|"+ check_bl03)
	if(check_bl01  && check_bl02  && check_bl03  && check_bl04  && check_bl05  && check_bl06  && check_bl07){
		$('#menu').submit();
	}
}
</script>		
	</body>
</html>
<!-- haha! everyone is a frontier -->